<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="../css/ui-base.css">
    <link rel="stylesheet" href="../css/ui-box.css">
	<link rel="stylesheet" href="../css/project/style.css">
	<link rel="stylesheet" href="css/forappcan.css">
    <script src="../js/zy_json.js"></script>
    <script src="../js/zy_control.js"></script>
    <script src="../js/zy_click.js"></script>
    <script src="../js/zy_tmpl.js"></script>
	<script src="../js/main.js"></script>
	<script src='../js/zy_slide.js'></script>
	<script src="../js/json2.js"></script>
	<script src="../js/saplife.js"></script>
</head>
<body class="um-vp c-wh2" ontouchstart>
	<div class="ub ub-ver">
		<div id="newsList">
		</div>
	</div>
</body>
<script>
zy_init();
window.uexOnload=function(type){
	if(!type){
		uexWindow.setBounce("1");
		uexWindow.showBounceView("0", "rgba(255,255,255,0)", "0");
        uexWindow.showBounceView("1", "rgba(255,255,255,0)", "0");
	}
	newsList();
}

//新闻列表
function newsList(){
	var params = zy_parse();
	var url = articleApiUrl + "/" + params.tab + "?s=20";
	$.getJSON(url, function(result) {
		var arrData = result.data;
	    var tmpl = '<div class="ub ub-f1 uinn-for1 ubb b-gra4" ontouchstart="zy_touch(\'\')" onclick="openNewWin(\'news_articlecommon\',\'../news_articlecommon/news_articlecommon.html?articleId=${_id}\');">'
				+'	<div class="ub-img uwh-for2 mar-ar1" style="background-image:url(\'css/myImg/newsImg2.png\');"></div>'
				+'	<div class="ub-f1 ub ub-ver">'
				+'		<div class="ulev-app1 t-gra3 ulh-for">${title}</div>'
				+'		<div class="ulev-4 t-gra-b1 ulh-for uh-for2 uof">${content}</div>'
				+'		${comments}'
				+'	</div>'
				+'</div>';
		var s = zy_tmpl(tmpl, arrData, zy_tmpl_count(arrData), tmpleCb);
		var d = document.createElement('DIV');
		d.innerHTML=s;
		$$('newsList').appendChild(d);
	});
}

function tmpleCb(a, b){
	var str = '';
	switch(b[1]){
		case "mark":
		var arr1 = a['mark'];
		if(arr1[0]==0){
			str += '<div class="ulev-4 t-gra-b1 tx-r umar-t">'+ arr1[1].posts+'跟帖</div>'
		}else{
			str += '<div class="ub ub-pe umar-t">'
					+'	<div class="ulev-2 t-wh uinn-for2 c-red-for3 uc-a-news ub-pe">专题</div>'
					+'</div>'
		}
		return str;
	}	
}

</script>
</html>
